{% extends 'base.html' %}

{% block title %}知了问答-首页{% endblock %}

{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='index.css' ) }}">
{% endblock %}

{% block body %}
<div class="row mt-4">
  <div class="col"></div>
  <div class="col-8">
    <ul class="question-ul">
      {% for question in questions %}
        <li>
          <div class="side-question">
            <img src="{{url_for('static',filename='images/avatar.jpg')}}" alt="" class="side-question-avatar">
          </div>
          <div class="question-main">
            <div class="question-title">
              <a href="{{url_for('qa.question_detail',id=question.id)}}">{{question.title}}</a>
            </div>
            <div class="question-content">{{question.content}}</div>
            <div class="question-detail">
              <span class="question-author">{{question.author.username}}</span>
              <span class="question-time">{{question.create_time}}</span>
            </div>
          </div>
        </li>
      {% endfor %}
    </ul>
  </div>
  <div class="col"></div>
</div>
{% endblock %}